back to index.

1k - The state of things

1k now sits at just over 1k lines. Parity with Kilo? Not quite - I haven't added syntax highlighting, but other than multi-cursor, every feature I normally use in an editor is in there. I've been using it as my terminal editor for the past few weeks and things have been basically fine.

Undo-redo is quite basic - we have a series of operations (`Insert`, `Remove`, `Line Split`, `Line Join`), that are written to a slice of `Operation`s - just a union type of the individual ones. Undo then traverses back, and redo traverses forward, re-applying / unapplying the change.

Drawing performance on linux is worse than MacOS, the Linux version of Ghostty shows tearing pretty often, which I can resolve by implementing some double buffering or dirty blitting. Interesting that the Mac version doesn't need this - but I imagine a mroe tightly controlled OS can do a lot of thigns to get around bad performance like this. And it is just bad performance, there's no need for me to be writing every on-screen cell every frame. This will also help with syntax highlighting - having some sense of metadata aroudn what is to be drawn lets me control the colours of text as well. That will come soon.